Skip to content

Comments

196 make a user interface for generating genlab ids#197

Merged
aastabk merged 3 commits intosummer25from
196-make-a-user-interface-for-generating-genlab-ids
Jul 7, 2025
Merged

196 make a user interface for generating genlab ids#197
aastabk merged 3 commits intosummer25from
196-make-a-user-interface-for-generating-genlab-ids

Conversation

@aastabk
Copy link
Contributor

@aastabk aastabk commented Jul 7, 2025

Frontend changes to later support sorting and selecting samples for generating genlab IDs. The generation of genlab IDs themselves works as before (generates for all in a random order).

Previous issue with changes to Genlab ID generation:
When looking at incoming samples, staff is now able to sort the columns and then generate a genlabID in their desired order. They are also able to only generate a genlabID for a selected few.

  • Changes are made to html files to send the post request within the same form.
  • Generate now accepts more fields
  • Still support for the other buttons that generate genlabIDs
  • Javascript is added to make checkboxes dynamic
Screenshot 2025-07-07 at 10 11 22

@aastabk aastabk requested review from mortenlyn and omfj July 7, 2025 08:19
@aastabk aastabk self-assigned this Jul 7, 2025
@aastabk aastabk linked an issue Jul 7, 2025 that may be closed by this pull request
@aastabk aastabk changed the base branch from main to summer25 July 7, 2025 08:19
@aastabk aastabk force-pushed the 196-make-a-user-interface-for-generating-genlab-ids branch from e0f810b to ed4488d Compare July 7, 2025 08:24
@omfj
Copy link
Contributor

omfj commented Jul 7, 2025

Gjør "Generate genlabIDs"-knappen noe? Om ikke kan de være disabled? Samme gjelder for checkboxene.

@aastabk
Copy link
Contributor Author

aastabk commented Jul 7, 2025

Gjør "Generate genlabIDs"-knappen noe? Om ikke kan de være disabled? Samme gjelder for checkboxene.

Den gjør noe. Fungerer som de andre knappene, men den sender ned variabler som senere vil trengs til å generere genlab ID-er i ønsket rekkefølge (sender ned selected_samples og sorting_order)

@aastabk aastabk merged commit a558293 into summer25 Jul 7, 2025
8 checks passed
@aastabk aastabk deleted the 196-make-a-user-interface-for-generating-genlab-ids branch July 7, 2025 10:04
mortenlyn pushed a commit that referenced this pull request Jul 7, 2025
* Frontend for generating genlab IDs

* Fix linter newline errors

* Minor changes (types, error function)
nicokant pushed a commit that referenced this pull request Jul 10, 2025
* Frontend for generating genlab IDs

* Fix linter newline errors

* Minor changes (types, error function)
github-merge-queue bot pushed a commit that referenced this pull request Jul 14, 2025
* Add 'is_urgent' field to Order model and update related forms

* Implement DashboardView and create dashboard template for urgent GenRequests

* Fix broken alias. (#82)

* Add week number and date to dashboard frontpage

* Display confirmed orders on dashboard frontpage

* Rearrange dashboard header elements for improved layout

* Change status Confirmed to Delivered. (#80)

* Remove capitalize function

* Reformat code

* Merge migrations

* Add help text for is_urgent field in EquipmentOrder model and remove redundant label in EquipmentOrderForm

* Use 'source' instead of '.' for loading aliases-private.sh in aliases.sh

* Remove redundant label for is_urgent field in forms

* Change confirmed_orders filter status from CONFIRMED to DELIVERED in DashboardView

* Added a field for person to contact with an email field on a per order basis.

* Draft to display the urgent orders. See tailwind.html for the current attempt.

* fix

* The tables are now sorted by the "is_urgent" field with the "true" value showing first.

* Added comment to the tailwind.html file.

* Use django template to render date and week

* Refactor urgent orders handling in DashboardView and template

* Deleted redundant label fields.

* Draft to display the urgent orders. See tailwind.html for the current attempt.

* fix

* The tables are now sorted by the "is_urgent" field with the "true" value showing first.

* Added comment to the tailwind.html file.

* Refactor urgent orders handling in DashboardView and template

* Use django template to render date and week

* Added a field for person to contact with an email field on a per order basis.

* Remove unnecessary whitespace in DashboardView context preparation

* Replace remaining confirmed orders with delivered

* Merge bad migrations (17)

* Clean up migration history

* Enhance dashboard order display with deadline and status; filter urgent orders by specific statuses

* Add admin user to genlab group

* Disable override code. (#59)

* Add ANN rules. (#57)

* Add ANN rules.

* Add ANN rules with typing.

* Fix missing return type.

* Run actions on target summer25. (#125)

* Register Permission. (#107)

* Improve SampleAdmin. (#114)

* Improve ExtractionOrderAdmin. (#118)

* Improve AnalysisOrderAdmin. (#122)

* Improve AnalysisOrderAdmin.

* Fix id search.

* Add order filter. (#127)

* Improve EquipmentOrderAdmin. (#129)

* Generalise out of template (#115)

* Auto-generate fish_id and conditionally include it in csv based on aquatic area (#120)

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Fix typo confirmed -> delivered (#130)

* Display fish_id in admin. (#134)

* Improve SampleMarkerAnalysisAdmin. (#136)

* Improve SampleMarkerAnalysisAdmin.

* Fix SampleMarkerAnalysis verbose_name_plural.

* Add missing migration. (#140)

* Improve ExtractPlatePositionAdmin. (#138)

* Stop makemigration in entrypoint. (#143)

* Improve SpeciesAdmin. (#148)

* Improve MarkerAdmin. (#150)

* Improve AnalysisResultAdmin. (#154)

* Improve ExtractionPlateAdmin. (#152)

* Update equipment order detail template to clarify buffer/volume column. (#162)

Make equipment order information on staff page and other page the same.

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Improve AreaAdmin. (#156)

* Improve LocationAdmin. (#158)

* Improve SampleTypeAdmin. (#167)

* Improve GenrequestAdmin. (#160)

* Improve EquipmentTypeAdmin. (#169)

* Improve EquimentOrderQuantityAdmin. (#171)

* Assign staff to order (#165)

* Improve EquipmentBufferAdmin. (#173)

* Add verbose_name and help_text to expected_delivery_date attribute in AnalysisOrder (#176)

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Add status columns and batch update for samples (#141)

* Add new page with status columns for samples

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Add mypy alias. (#193)

* Now shown the number of samples in an order, not the samples in the project. (#179)

* Refactor SampleLabView to use a dedicated success URL for redirection after status updates (#190)

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* 180 able to prioritize samples internally (#183)

* Added a field for internal priority. Changes in column order so that prioritised shows up on top.

* Fix for linter errors

* 196 make a user interface for generating genlab ids (#197)

* Frontend for generating genlab IDs

* Fix linter newline errors

* Minor changes (types, error function)

* Always an option to convert to draft (#199)

* Always an option to convert to draft

* Minor linter fix

* Add button to link from extraction order to related analysis order (#198)

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Add urgent, new and assigned orders to dashboard (#178)

* Able to change status and convert to draft for analysis orders (#202)

* Able to change status and convert to draft for analysis orders

* Minor spacing

* Add is_seen and is_prioritized to order (#204)

* Mark orders as seen and prioritized from the dashboard (#191)

* Add link to related extraction order analysis order (#205)

* Refactor analysis order selection in extraction order page

* Add link to related extraction order from analysis order page

---------

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Add column note in sample status page (#194)

* Add note field to Sample model and implement update functionality

* Rename "note" to "internal_note" to minimize confusion

---------

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Fix conditional rendering for extraction order link in analysis order detail (#208)

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Display markers on dashboard (#207)

* Fix bug where dropdown in header is disabled in sample status page (#213)

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Reorganize project detail layout and conditional rendering for verification button (#210)

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Get sample count for analysis (#216)

* Remove redundant prefetch (#219)

* Make responsible staff blank (#220)

* Add description to my orders (#221)

* Stack dashboard on smaller screens (#224)

* Display orders assigned to user (#223)

* Assign statuses with lower weight than selected (#226)

* Add table for draft orders to dashboard (#227)

* 203 add button to check new orders if you are responsible analysis and extraction (#217)

* Added frontend button to mark as seen

* Frontend for checking orders as "is_seen". No checks for responsible genetic project staff.

* Added bell icon to the rows that are not yet marked as seen.

* Mark as seen is now one url and view.

* Added hidden field to separate the return pages.

* Removed unnecessary code

* Made a workaround to not have a buggy upper flag in samples list. (#228)

* Made a workaround to not have a buggy upper flag in samples list.

* Fix linter errors

* BREAKING CHANGE - remove the use of database sequences (#230)

* Able to add staff to genrequest (#244)

* Able to add staff to genrequest

* Fixed migration issues

* Column for isolation method sample status (#243)

* WIP: added isolation_method to sample and SampleIsolationMethod class

* Add isolation method handling in sample status page (#238)

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Update migrations

* Refactor post method to work with new changes and remove sorting on checkboxes

* Refactor sample status handling

Remove SampleStatus model, update migrations, and adjust related views and templates

---------

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* Add 'type' column to SampleStatusTable and update back button link in sample_lab.html (#246)

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>

* fix: remove select related of nullable field

---------

Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>
Co-authored-by: Emil Telstad <22004178+emilte@users.noreply.github.com>
Co-authored-by: aastabk <aastabk@stud.ntnu.no>
Co-authored-by: Bertine <112892518+aastabk@users.noreply.github.com>
Co-authored-by: Morten Lyngstad <81157760+mortenlyn@users.noreply.github.com>
Co-authored-by: Niccolò Cantù <niccolo.cantu@nina.no>
emilte added a commit that referenced this pull request Jul 14, 2025
* Add 'is_urgent' field to Order model and update related forms

* Implement DashboardView and create dashboard template for urgent GenRequests

* Fix broken alias. (#82)

* Add week number and date to dashboard frontpage

* Display confirmed orders on dashboard frontpage

* Rearrange dashboard header elements for improved layout

* Change status Confirmed to Delivered. (#80)

* Remove capitalize function

* Reformat code

* Merge migrations

* Add help text for is_urgent field in EquipmentOrder model and remove redundant label in EquipmentOrderForm

* Use 'source' instead of '.' for loading aliases-private.sh in aliases.sh

* Remove redundant label for is_urgent field in forms

* Change confirmed_orders filter status from CONFIRMED to DELIVERED in DashboardView

* Added a field for person to contact with an email field on a per order basis.

* Draft to display the urgent orders. See tailwind.html for the current attempt.

* fix

* The tables are now sorted by the "is_urgent" field with the "true" value showing first.

* Added comment to the tailwind.html file.

* Use django template to render date and week

* Refactor urgent orders handling in DashboardView and template

* Deleted redundant label fields.

* Draft to display the urgent orders. See tailwind.html for the current attempt.

* fix

* The tables are now sorted by the "is_urgent" field with the "true" value showing first.

* Added comment to the tailwind.html file.

* Refactor urgent orders handling in DashboardView and template

* Use django template to render date and week

* Added a field for person to contact with an email field on a per order basis.

* Remove unnecessary whitespace in DashboardView context preparation

* Replace remaining confirmed orders with delivered

* Merge bad migrations (17)

* Clean up migration history

* Enhance dashboard order display with deadline and status; filter urgent orders by specific statuses

* Add admin user to genlab group

* Disable override code. (#59)

* Add ANN rules. (#57)

* Add ANN rules.

* Add ANN rules with typing.

* Fix missing return type.

* Run actions on target summer25. (#125)

* Register Permission. (#107)

* Improve SampleAdmin. (#114)

* Improve ExtractionOrderAdmin. (#118)

* Improve AnalysisOrderAdmin. (#122)

* Improve AnalysisOrderAdmin.

* Fix id search.

* Add order filter. (#127)

* Improve EquipmentOrderAdmin. (#129)

* Generalise out of template (#115)

* Auto-generate fish_id and conditionally include it in csv based on aquatic area (#120)



* Fix typo confirmed -> delivered (#130)

* Display fish_id in admin. (#134)

* Improve SampleMarkerAnalysisAdmin. (#136)

* Improve SampleMarkerAnalysisAdmin.

* Fix SampleMarkerAnalysis verbose_name_plural.

* Add missing migration. (#140)

* Improve ExtractPlatePositionAdmin. (#138)

* Stop makemigration in entrypoint. (#143)

* Improve SpeciesAdmin. (#148)

* Improve MarkerAdmin. (#150)

* Improve AnalysisResultAdmin. (#154)

* Improve ExtractionPlateAdmin. (#152)

* Update equipment order detail template to clarify buffer/volume column. (#162)

Make equipment order information on staff page and other page the same.



* Improve AreaAdmin. (#156)

* Improve LocationAdmin. (#158)

* Improve SampleTypeAdmin. (#167)

* Improve GenrequestAdmin. (#160)

* Improve EquipmentTypeAdmin. (#169)

* Improve EquimentOrderQuantityAdmin. (#171)

* Assign staff to order (#165)

* Improve EquipmentBufferAdmin. (#173)

* Add verbose_name and help_text to expected_delivery_date attribute in AnalysisOrder (#176)



* Add status columns and batch update for samples (#141)

* Add new page with status columns for samples



* Add mypy alias. (#193)

* Now shown the number of samples in an order, not the samples in the project. (#179)

* Refactor SampleLabView to use a dedicated success URL for redirection after status updates (#190)



* 180 able to prioritize samples internally (#183)

* Added a field for internal priority. Changes in column order so that prioritised shows up on top.

* Fix for linter errors

* 196 make a user interface for generating genlab ids (#197)

* Frontend for generating genlab IDs

* Fix linter newline errors

* Minor changes (types, error function)

* Always an option to convert to draft (#199)

* Always an option to convert to draft

* Minor linter fix

* Add button to link from extraction order to related analysis order (#198)



* Add urgent, new and assigned orders to dashboard (#178)

* Able to change status and convert to draft for analysis orders (#202)

* Able to change status and convert to draft for analysis orders

* Minor spacing

* Add is_seen and is_prioritized to order (#204)

* Mark orders as seen and prioritized from the dashboard (#191)

* Add link to related extraction order analysis order (#205)

* Refactor analysis order selection in extraction order page

* Add link to related extraction order from analysis order page

---------



* Add column note in sample status page (#194)

* Add note field to Sample model and implement update functionality

* Rename "note" to "internal_note" to minimize confusion

---------



* Fix conditional rendering for extraction order link in analysis order detail (#208)



* Display markers on dashboard (#207)

* Fix bug where dropdown in header is disabled in sample status page (#213)



* Reorganize project detail layout and conditional rendering for verification button (#210)



* Get sample count for analysis (#216)

* Remove redundant prefetch (#219)

* Make responsible staff blank (#220)

* Add description to my orders (#221)

* Stack dashboard on smaller screens (#224)

* Display orders assigned to user (#223)

* Assign statuses with lower weight than selected (#226)

* Add table for draft orders to dashboard (#227)

* 203 add button to check new orders if you are responsible analysis and extraction (#217)

* Added frontend button to mark as seen

* Frontend for checking orders as "is_seen". No checks for responsible genetic project staff.

* Added bell icon to the rows that are not yet marked as seen.

* Mark as seen is now one url and view.

* Added hidden field to separate the return pages.

* Removed unnecessary code

* Made a workaround to not have a buggy upper flag in samples list. (#228)

* Made a workaround to not have a buggy upper flag in samples list.

* Fix linter errors

* BREAKING CHANGE - remove the use of database sequences (#230)

* Able to add staff to genrequest (#244)

* Able to add staff to genrequest

* Fixed migration issues

* Column for isolation method sample status (#243)

* WIP: added isolation_method to sample and SampleIsolationMethod class

* Add isolation method handling in sample status page (#238)



* Update migrations

* Refactor post method to work with new changes and remove sorting on checkboxes

* Refactor sample status handling

Remove SampleStatus model, update migrations, and adjust related views and templates

---------



* Add 'type' column to SampleStatusTable and update back button link in sample_lab.html (#246)



* fix: remove select related of nullable field

---------

Co-authored-by: Ole Magnus <me@omfj.no>
Co-authored-by: Morten Madsen Lyngstad <morten.lyngstad@bekk.no>
Co-authored-by: aastabk <aastabk@stud.ntnu.no>
Co-authored-by: Bertine <112892518+aastabk@users.noreply.github.com>
Co-authored-by: Morten Lyngstad <81157760+mortenlyn@users.noreply.github.com>
Co-authored-by: Niccolò Cantù <niccolo.cantu@nina.no>
@omfj omfj mentioned this pull request Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make a user interface for generating genlab IDs

3 participants